define(function(require, exports, module) {

	"use strict";
	var alertMore = {
		alertTshow: function(i) { //输入框获取焦点 提示窗隐藏
			$(".alertT").eq(i).stop().animate({
				"top": "70px"
			}, 400, function() {
				$(this).delay(1000).fadeOut(500, function() {
					$(this).css("top", "-55px");
					$(this).show();
				});
			});
		},
		alertText: function(i) { //输入框获取焦点 提示窗隐藏
			$(".active").eq(i).attr("placeholder", "不能为空");
			$(".active").eq(i).addClass("invalid");
			$(".active").eq(i).addClass("invalidHtml");
		},
		alertRemove: function(i) {
			$(".active").eq(i).removeClass("invalid");
			$(".active").eq(i).removeClass("invalidHtml");
		},
		alerTs: function(callback) {
			//			var companySerial = $("#companySerial").text().trim();
			var companyName = $("#companyName").val().trim();
			var companyCatalogNameId = Number($(".userName").attr("data-id"));
			var clientStaff = $("#clientStaff").html();
			var contact = $("#contact").val().trim();
			var contactMobile = $("#contactMobile").val().trim();
			//颜色
			//			if(!companySerial)	{alertMore.alertText(0)}else{alertMore.alertRemove(0)}
			if(!companyName) {
				alertMore.alertText(0);
			} else {
				alertMore.alertRemove(0);
			}
			if(!companyCatalogNameId) {
				alertMore.alertText(1);
			} else {
				alertMore.alertRemove(1);
			}
			if(clientStaff == "(必选)") {
				alertMore.alertText(2);
			} else {
				alertMore.alertRemove(2);
			}
			if(!contact) {
				alertMore.alertText(3);
			} else {
				alertMore.alertRemove(3);
			}
			if(!contactMobile) {
				alertMore.alertText(4);
			} else {
				alertMore.alertRemove(4);
			}
			//弹框 
			//			if(!companySerial)	{alertMore.alertTshow(0); return;}
			if(!companyName) {
				alertMore.alertTshow(0);
				return;
			}
			if(!companyCatalogNameId) {
				alertMore.alertTshow(1);
				return;
			}
			if(clientStaff == "(必选)") {
				alertMore.alertTshow(2);
				return;
			}
			if(!contact) {
				alertMore.alertTshow(3);
				return;
			}
			if(!contactMobile) {
				alertMore.alertTshow(4);
				return;
			}
			callback();

		}

	};
	module.exports = alertMore;

});